Type-Driven Development with Idris by Edwin Brady
Author:Edwin Brady
Language: eng
Format: epub, pdf
Publisher: Manning Publications
Here, Idris has evaluated 1 + k in the type to S k. But if you try swapping the arguments to +, you’ll get a different result:
*ReverseVec> \k, elem => Vect (k + 1) elem \k => \elem => Vect (plus k 1) elem : Nat -> Type -> Type
Here, Idris has evaluated k + 1 to plus k 1, where plus is the Prelude function that implements addition on Nat. To see the reason for the difference, you need to look at the definition of plus. You can do this using the REPL command :printdef, which prints the pattern-matching definition of the function given as its argument:
*ReverseVec> :printdef plus plus : Nat -> Nat -> Nat plus 0 right = right plus (S left) right = S (plus left right)
Download
Type-Driven Development with Idris by Edwin Brady.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Coding Theory | Localization |
Logic | Object-Oriented Design |
Performance Optimization | Quality Control |
Reengineering | Robohelp |
Software Development | Software Reuse |
Structured Design | Testing |
Tools | UML |
Deep Learning with Python by François Chollet(12524)
Hello! Python by Anthony Briggs(9869)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9759)
The Mikado Method by Ola Ellnestam Daniel Brolund(9749)
Dependency Injection in .NET by Mark Seemann(9295)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8260)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7743)
Grails in Action by Glen Smith Peter Ledbrook(7669)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7519)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(6751)
Microservices with Go by Alexander Shuiskov(6518)
Practical Design Patterns for Java Developers by Miroslav Wengner(6416)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6394)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6380)
Angular Projects - Third Edition by Aristeidis Bampakos(5774)
The Art of Crafting User Stories by The Art of Crafting User Stories(5305)
NetSuite for Consultants - Second Edition by Peter Ries(5248)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5067)
Kotlin in Action by Dmitry Jemerov(5021)
